CREATE EXTERNAL TABLE `jms_dm.dm_traffic_flow_details_new_dt`(
  `inputtime` date COMMENT '日期', 
  `waybill_no` string COMMENT '运单号', 
  `goods_name` string COMMENT '物品名称', 
  `collect_time` timestamp COMMENT '上门取件时间', 
  `send_regional_id` string COMMENT '始发大区id', 
  `send_regional` string COMMENT '始发大区name', 
  `send_agent_code` string COMMENT '始发代理区code', 
  `send_agent` string COMMENT '始发代理区name', 
  `send_fran_code` string COMMENT '始发加盟商code', 
  `send_fran` string COMMENT '始发加盟商name', 
  `send_province_id` string COMMENT '始发省份id', 
  `send_province` string COMMENT '始发省份name', 
  `send_city_id` string COMMENT '始发城市id', 
  `send_city` string COMMENT '始发城市name', 
  `send_area_id` string COMMENT '始发区id', 
  `send_area` string COMMENT '始发区name', 
  `send_distributecode` string COMMENT '始发转运中心code', 
  `send_distribute` string COMMENT '始发转运中心name', 
  `entrepot_code` string COMMENT '始发集散点code', 
  `entrepot_name` string COMMENT '始发集散点name', 
  `send_network_code` string COMMENT '始发网点code', 
  `send_network` string COMMENT '始发网点name', 
  `receiver_network_code` string COMMENT '签收网点code', 
  `receiver_network` string COMMENT '签收网点name', 
  `receiver_agent_code` string COMMENT '签收代理区code', 
  `receiver_agent` string COMMENT '签收代理区name', 
  `receiver_fran_code` string COMMENT '签收加盟商code', 
  `receiver_fran` string COMMENT '签收加盟商name', 
  `receiver_regional_id` string COMMENT '签收大区id', 
  `receiver_regional` string COMMENT '签收大区name', 
  `receiver_province_id` string COMMENT '签收省份id', 
  `receiver_province` string COMMENT '签收省份name', 
  `receiver_city_id` string COMMENT '签收城市id', 
  `receiver_city` string COMMENT '签收城市name', 
  `receiver_distributecode` string COMMENT '目的转运中心code', 
  `receiver_distribute` string COMMENT '目的转运中心name', 
  `dispatch_network_code` string COMMENT '目的集散点code', 
  `dispatch_network_name` string COMMENT '目的集散点name', 
  `receiver_area_id` string COMMENT '签收区id', 
  `receiver_area` string COMMENT '签收区name', 
  `package_weight` string COMMENT '重量', 
  `package_volume` string COMMENT '体积', 
  `start_center_agent_code` string COMMENT '始发中心所属代理区', 
  `start_center_agent_name` string COMMENT '始发中心所属代理区', 
  `end_center_agent_code` string COMMENT '目的中心所属代理区', 
  `end_center_agent_name` string COMMENT '目的中心所属代理区')
COMMENT '流量流向明细表'
PARTITIONED BY ( 
  `dt` string COMMENT '时间分区(yyyy-MM-dd)')
ROW FORMAT SERDE 
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' 
STORED AS INPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat' 
OUTPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://yl-bg-hdp/dw/hive/jms_dm.db/external/dm_traffic_flow_details_new_dt'